
#pragma once

#include <memory>
#include <string>
#include "Status.h"
#include "rocksdb/slice.h"


namespace streamdb {
class IStream {
public:
    virtual ~IStream(){}
    virtual const std::string & getName() const  = 0;
    virtual Status open() = 0;
    virtual Status close() = 0;
    virtual Status append(const rocksdb::Slice & msg) = 0;
    virtual Status flush() = 0 ;
};

std::shared_ptr<IStream> makeStream(const std::string name);


}//namespace streamdb
